package Exists;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
import java.time.format.DateTimeFormatter;

public class Demo02 {

    public static void main(String[] args) {

        LocalDateTime res = LocalDateTime.now();

        String Teta = res.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH时mm分ss秒"));
        System.out.println(Teta);
        LocalDateTime res1 = LocalDateTime.of(2012, Month.JULY, 31, 7, 38, 16);
        String num = res1.format(DateTimeFormatter.ofPattern("yyyy年MM月dd HH时mm分ss秒"));

        System.out.println(num);
        LocalDate res2 = LocalDate.of(2012, Month.JULY, 12);
        String num2 = res2.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日"));
        System.out.println(num2);

        LocalTime res3 = LocalTime.of(07, 38, 46);

        String num1 = res3.format(DateTimeFormatter.ofPattern("HH时mm分ss秒"));
        System.out.println(num1);

    }


}